<%@ page import="java.util.Arrays" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%--
  Created by IntelliJ IDEA.
  User: lenovo
  Date: 2020/6/10
  Time: 14:25
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>uploadData</title>
    <link href="css/bootstrap.min.css" rel="stylesheet">
    <script src="js/jquery-1.11.3.min.js"></script>
    <script src="js/bootstrap.min.js"></script>
</head>
<body>

<div class="container-fluid">
      <p align="center" style="font-size: 20px;font-weight: bold;margin-top: 5%">  选择数据  </p>
    <div class="row">
        <div class="col-md-6 col-md-offset-3" style="border: 1px solid black" >
            <div class="row" style="margin-top: 5%;margin-bottom: 5%">
                <div class="col-md-4 col-md-offset-4">
                    <form action="/Java_web/DataSearch" method="post">
                        <input type="submit" value="搜索数据库" />
                    </form>
                    <span class="FZ">
                    <c:if test = "${!(empty dataTable)}">
                        搜索完毕
                    </c:if>
                     <c:if test = "${(empty dataTable)}">
                            <div><br/></div>
                     </c:if>
                    </span>

                    <form action="/Java_web/UploadData" method="post" enctype="multipart/form-data">
                        <select name="data">
                            <c:if test = "${(empty dataTable)}">
                                <option>请先搜索数据库</option>
                            </c:if>
                            <c:forEach items="${sessionScope.dataTable}" var="item">
                                <option value=${item}>${item}</option>
                            </c:forEach>
                            <input type="submit" value="导入" />
                        </select>
                    </form>
                </div>
            </div>
        </div>
    </div>

    <br/>

    <div class="row">
        <div class="col-md-6 col-md-offset-3" style="border: 1px solid black" >
            <div class="row" style="margin-top: 5%;margin-bottom: 5%">
                <div class="col-md-4 col-md-offset-4">
                    <form action="/Java_web/UploadData_txt" method="post" enctype="multipart/form-data">
                        <label>用户名：</label>
                        <input type="text" name="username" /> <br/><br/>
                        <label>数据：</label>
                        <input type="file" name="data"><br/><br/>
                        <input type="submit" value="导入">
                    </form>
                </div>
            </div>
        </div>
    </div>

</div>

</body>

</html>
